<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="resources/scripts/axure/axQuery.js"></script>
    <script src="resources/scripts/axure/globals.js"></script>
    <script src="resources/scripts/axutils.js"></script>
    <script src="resources/scripts/axure/annotation.js"></script>
    <script src="resources/scripts/axure/axQuery.std.js"></script>
    <script src="resources/scripts/axure/doc.js"></script>
    <title>Document</title>
    <style>
        body {
            background-color: rgb(180, 206, 243);
            font-size: 20px;
        }

        .index {
            padding-top: 100px;
            padding-bottom: 100px;
            margin: auto;
            width: 920px;
            background-color: white;
            box-shadow: 10px 10px 15px black;
            margin-top: 50px;
        }

        form {
            padding-left: 100px;
            line-height: 180%;
        }

        p {
            line-height: 180%;
        }

        #btn {
            background-color: #425fc9;
            color: white;
            padding: 5px 10px;
            margin-left: 320px;
            margin-top: 16px;
            margin-bottom: 20px;
            font-size: 20px;
        }
    </style>
</head>

<body>
    <div class="index">
        <p style="font-size:30px;text-align: center;">教学类软件评价指标重要性调查问卷</p>
        <div style="width:75% ;margin: auto;text-indent:2em;">
            在疫情时代，线上教学占据的比重越来越大，相关的教学类软件也都不断发展，面对一定数量的教学类软件，大众对其评价指标的重要性程度也有着各自看法，该调查旨在分析人们对于各种教学类软件评价指标的重要性看法。</div>
        <br>
        <br>
        <p style="width:75% ;margin: auto;text-indent:2em;">根据所给内容及个人经验填写以下问卷。</p>
        <form method="get" action="/kuan" id="tform">
            <ol>
                <li>您认为目前最好的教学类软件是哪一款？</li>
                <input type="text" name="app" id="kuan" required style="width: 600px;height: 30px;">
                <label style="visibility: hidden;"><input id="us" type="radio" name="username" value="username"
                        checked="checked" />&nbsp;&nbsp;特别熟悉 </label>
            </ol>
            <!--<button id="btn" type="submit">提交问卷</button>-->
            <input id="btn" type="submit" align="absmiddle" value="提交问卷" class="sebutt" name="button1">
        </form>
    </div>
    <script>
        var loc = location.href;
        var n1 = loc.length;
        var n2 = loc.indexOf('=')
        if (n2 >= 0 && n2 <= n1) {
            var n3 = loc.substring(n2 + 1);
            var username = n3;
            username = username.toString();
            if(username=='user'){
                document.getElementById("btn").style.display='none'
            }
            var data = {
                username
            }
            console.log("data:", data)
            document.getElementById("us").value = username;

            // $.get('/main11',data,function(re){ })
        } else {
            alert("非法进入！");
            window.location = "index.html"
        }


        /*tform.onchange=function () {
            const t1 = document.getElementsByName("sx");
            const t2 = document.getElementsByName("gn");
            const t3 = document.getElementsByName("jg");
            const t4 = document.getElementsByName("sp");
            const t5 = document.getElementsByName("xx");
            for (let i = 0; i <t1.length ; i++) {
                if(t1[i].checked) console.log(t1[i].value);
            }
            for (let i = 0; i <t2.length ; i++) {
                if(t2[i].checked) console.log(t2[i].value);
            }
            for (let i = 0; i <t3.length ; i++) {
                if(t3[i].checked) console.log(t3[i].value);
            }
            for (let i = 0; i <t4.length ; i++) {
                if(t4[i].checked) console.log(t4[i].value);
            }
            for (let i = 0; i <t5.length ; i++) {
                if(t5[i].checked) console.log(t5[i].value);
            }
        }*/
        /*
                function TJ(){
                    var ly1=document.getElementById('ly1').value;
                    var ly2=document.getElementById('ly2').value;
                    var ly3=document.getElementById('ly3').value;
                    var ly4=document.getElementById('ly4').value;
                    var ly5=document.getElementById('ly5').value;

                    const fs=require('fs')
                    const path=require('path')

                    var tt1,tt2,tt3,tt4,tt5,tt6,tt7,tt8,tt9

                    const t1 = document.getElementsByName("sx");
                    const t2 = document.getElementsByName("gn");
                    const t3 = document.getElementsByName("jg");
                    const t4 = document.getElementsByName("sp");
                    const t5 = document.getElementsByName("xx");
                    const t6 = document.getElementsByName("sj");
                    const t7 = document.getElementsByName("ll");
                    const t8 = document.getElementsByName("zg");
                    const t9 = document.getElementsByName("sxcd");
                    for (let i = 0; i <t1.length ; i++) {
                        if(t1[i].checked){
                           tt1=t1[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t2.length ; i++) {
                        if(t2[i].checked){
                            tt2=t2[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t3.length ; i++) {
                        if(t3[i].checked){
                            tt3=t3[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t4.length ; i++) {
                        if(t4[i].checked){
                           tt4=t4[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t5.length ; i++) {
                        if(t5[i].checked){
                           tt5=t5[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t6.length ; i++) {
                        if(t6[i].checked){
                            tt6=t6[i].value
                        }
                        
                    }
                    for (let i = 0; i <t7.length ; i++) {
                        if(t7[i].checked){
                          tt7=t7[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t8.length ; i++) {
                        if(t8[i].checked){
                           tt8=t8[i].value
                        } 
                        
                    }
                    for (let i = 0; i <t9.length ; i++) {
                        if(t9[i].checked){
                            tt9=t9[i].value
                        } 
                        
                    }
                    */
        /*
            let p=path.join(_dirname,'data.json')
            alert(p)
            fs.readFile(p,'utf8',(err,data)=>{
                if(err){
                    console.log('err',err);
                    return
                }
                let arr=JSON.parse(data)
                arr.push({"no":"1","user":"zj1","wt":"ly1","answer":ly1})
                arr.push({"no":"1","user":"zj1","wt":"ly2","answer":ly2})
                arr.push({"no":"1","user":"zj1","wt":"ly3","answer":ly3})
                arr.push({"no":"1","user":"zj1","wt":"ly4","answer":ly4})
                arr.push({"no":"1","user":"zj1","wt":"ly5","answer":ly5})
                arr.push({"no":"1","user":"zj1","wt":"t1","answer":tt1})
                arr.push({"no":"1","user":"zj1","wt":"t2","answer":tt2})
                arr.push({"no":"1","user":"zj1","wt":"t3","answer":tt3})
                arr.push({"no":"1","user":"zj1","wt":"t4","answer":tt4})
                arr.push({"no":"1","user":"zj1","wt":"t5","answer":tt5})
                arr.push({"no":"1","user":"zj1","wt":"t6","answer":tt6})
                arr.push({"no":"1","user":"zj1","wt":"t7","answer":tt7})
                arr.push({"no":"1","user":"zj1","wt":"t8","answer":tt8})
                arr.push({"no":"1","user":"zj1","wt":"t9","answer":tt9})
                alert(arr);
                fs.writeFile(p,JSON.stringify(arr),'utf8',function (err){
                    console.log('err',err);
                })
            })
           alert("提交成功") 
        
        }*/
    </script>
</body>

</html>